<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<nav th:fragment="navbar(pageName)" class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" th:href="@{/index}">The Green Hell</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li th:class="${pageName eq 'index' ? 'active' : ''}">
                    <a th:href="@{/index}">介绍<span class="sr-only"></span></a>
                </li>
                <li th:class="${pageName eq 'lapTime' ? 'active' : ''}">
                    <a th:href="@{/lapTime}">圈速详情</a>
                </li>
                <li th:class="${pageName eq 'lapTimeManagement' ? 'active' : ''}">
                    <a th:href="@{/management}">车辆成绩管理</a>
                </li>
                <li th:class="${pageName eq 'insertVehicle' ? 'active' : ''}">
                    <a th:href="@{/management/insertVehicle}">添加车辆成绩</a>
                </li>
                <li th:class="${pageName eq 'vehicleIdentification' ? 'active' : ''}">
                    <a th:href="@{/management/vehicleIdentification}">百度接口车辆识别</a>
                </li>
            </ul>
        </div>
    </div>
</nav>
</body>
</html>